package com.baidu.sggc.mapper;

import com.baidu.sggc.entity.AuditLogFailedRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AuditLogFailedRecordMapper extends BaseMapper<AuditLogFailedRecord> {
    @Select("SELECT * FROM audit_log_failed_record WHERE retry_count < 3 ORDER BY failed_time ASC LIMIT 50")
    List<AuditLogFailedRecord> fetchFailedToRetry();
}